package ua.in.hut;

import java.io.*;
import java.util.logging.*;
import javax.servlet.*;
import javax.servlet.http.*;
import ua.org.ass.*;

/**
 * Сервлет для формування початкової сторінки.
 * @author frick.ua
 */
public class SrvIndex extends HTTPServlet {

	@Override
	public void get(HttpServletRequest req, HttpServletResponse res) {
		try {
			req.getRequestDispatcher("/html/head.html").include(req, res);
			res.getWriter().append("<body>");
			req.getRequestDispatcher("/html/login_panel.html").include(req, res);
			req.getRequestDispatcher("/html/message.html").include(req, res);
			req.getRequestDispatcher("/html/load_animation.html").include(req, res);
			res.getWriter().append("<div id=\"middle-panel\">");
			req.getRequestDispatcher("/html/title.html").include(req, res);
			res.getWriter().append("<div id=\"middle-content\">");
			res.getWriter().append("</div>");
			res.getWriter().append("</div>");
			req.getRequestDispatcher("/html/left_panel.html").include(req, res);
			req.getRequestDispatcher("/html/right_panel.html").include(req, res);
			res.getWriter().append("</body>");
			super.get(req, res);
		} catch (IOException ex) {
			Logger.getLogger(SrvIndex.class.getName()).log(Level.SEVERE, null, ex);
		} catch (ServletException ex) {
			Logger.getLogger(SrvIndex.class.getName()).log(Level.SEVERE, null, ex);
		}
	}
}
